#@token()
<input type="hidden" class="layui-input" id="orderId" name="sellOrder.orderId" value="#(sellOrder.order_id??)"/>
<div class="layui-row layui-col-space1 task-row">
	#@colStart("客户",6)
	<input id="customerId" type="hidden" class="layui-input" placeHolder="必填" name="sellOrder.customerId" value="#(sellOrder.customer_id??)"/>
	<input id="customerName" type="text" class="layui-input" placeHolder="必填" name="sellOrder.customerName" value="#(sellOrder.customer_name??)"/>
	#@colEnd()
	#@colStart("起单人",6)
	<input id="originator" type="hidden" placeHolder="必填" class="layui-input" name="sellOrder.originator" value="#(sellOrder.originator??)" />
	<input id="originatorName" type="text" placeHolder="必填" class="layui-input" name="sellOrder.originatorName" value="#(sellOrder.originatorName??)" />
	#@colEnd()
</div>
<div class="layui-row layui-col-space1 task-row">
	#@colStart("经手人",6)
	<input type="hidden" class="layui-input layui-disabled" name="sellOrder.hander" value="#(sellOrder.hander??)" readonly/>
	<input type="text" class="layui-input layui-disabled" name="sellOrder.handerName" value="#(sellOrder.handerName??)" readonly/>
	#@colEnd()
	#@colStart("确认人",6)
	<input type="hidden" class="layui-input layui-disabled" name="sellOrder.confirmer" value="#(sellOrder.confirmer??)" readonly/>
	<input type="text" class="layui-input layui-disabled" name="sellOrder.confirmerName" value="#(sellOrder.confirmerName??)" readonly/>
	#@colEnd()
</div>
<div class="layui-row layui-col-space1 task-row">
	#@colStart("起单时间",6)
	<input id="originatTime" type="text" lay-verType='tips' class="layui-input" name="sellOrder.originatTime" value="#(sellOrder.originat_time??)" />
	#@colEnd()
	#@colStart("计划到货时间",6)
	<input id="planTime" type="text" lay-verType='tips' class="layui-input" name="sellOrder.planTime" value="#(sellOrder.plan_time??)" />
	#@colEnd()
</div>
<div class="layui-row layui-col-space1 task-row">
	#@colStart("实际到货时间",6)
	<input id="actualTime" type="text" lay-verType='tips' class="layui-input" name="sellOrder.actualTime" value="#(sellOrder.actual_time??)" />
	#@colEnd()
	#@colStart('结账方式',6)
	<input name="sellOrder.settleWay" type="radio" value="1" title="现结"
		   #if(sellOrder.settle_way??==1||sellOrder??==null)checked="checked"#end/>
	<input name="sellOrder.settleWay" type="radio" value="0"  title="月结"
		   #if(sellOrder.settle_way??==0)checked="checked"#end/>
	#@colEnd()
</div>
<div class="layui-row layui-col-space1 task-row">
	#@colStart("总计金额",6)
	<input type="text" lay-verType='tips' class="layui-input" name="sellOrder.totalAmount" value="#(sellOrder.total_amount??)" />
	#@colEnd()
	#@colStart("是否含发票",6)
	<input name="sellOrder.containBill" type="radio" value="1" title="是"
		   #if(sellOrder.contain_bill??==1||sellOrder??==null)checked="checked"#end/>
	<input name="sellOrder.containBill" type="radio" value="0"  title="否"
		   #if(sellOrder.contain_bill??==0)checked="checked"#end/>
	#@colEnd()
</div>
<div class="layui-row layui-col-space1 task-row">
	#@colStart("税率",6)
	<input type="text" lay-verType='tips' class="layui-input" name="sellOrder.taxRate" value="#(sellOrder.tax_rate??)" />
	#@colEnd()
	#@colStart('单据状态',6)
	<select name="sellOrder.status" class="layui-input" lay-search>
		<option value="">---请选择---</option>
		#for(data:orderStatusMap)
		<option value="#(data.key??)" #if(sellOrder	.status??==data.key) selected="selected" #end>#(data.value??)</option>
		#end
	</select>
	#@colEnd()
</div>

#@submitButton2(3)

<!-- 时间控件 -->
#define layuiFunc()
    // 客户输入框点击事件
    $("#customerName").on('click',function () {
        openDialogReturn("收款方选择窗口","#(path)/erp/info/customer/index",false,null,null,null,function (res) {
            var customerId = res.customerId;
            var customerName = res.customerName;
            $("#customerId").val(customerId);
            $("#customerName").val(customerName);
        });
    })
	// 起单人输入框点击事件
    $("#originatorName").on('click',function () {
        openDialogReturn("支付方选择窗口","#(path)/portal/core/sysUser/index",false,null,null,null,function (res) {
            var userCode = res.userCode;
            var userName = res.userName;
            $("#originator").val(userCode);
            $("#originatorName").val(userName);
        });
    })

    laydate.render({
        elem: '#originatTime',
        type: 'datetime'
    });
    laydate.render({
        elem: '#planTime',
        type: 'datetime'
    });
    laydate.render({
        elem: '#actualTime',
        type: 'datetime'
    });

#end